<template>
  <div class="comment_detail">
    <div class="comment_detail_list">
      <!-- 主内容 -->
      <div class="reply_item_mate">
        <ReplyItem :noLike="true" :reply="{}" />
      </div>
      <!-- 回复  内容区域 -->
      <Sticky>
        <div class="flex_span">
          <span>评论 </span><span class="fw500 pl10">2</span>
          <span class="ml20">赞 </span><span class="fw500 pl10">2</span>
        </div>
      </Sticky>
      <div class="comment_reply">
        <ReplyList :replyList="replyList" @handleReply="handleReply" />
      </div>
    </div>
    <!-- 回复框 -->
    <ReplyBox :replyTo="replyTo" />
  </div>
</template>

<script setup>
import { Sticky } from "vant";
import { ref } from "vue";
import ReplyList from "./component/replyList.vue";
import ReplyBox from "./component/replyBox.vue";
import ReplyItem from "./component/replyItem.vue";

const rate = ref(4);
const item = ref();
const replyList = ref([1, 2, 3]);
const replyTo = ref({});
const handleReply = (event) => (replyTo.value = event);
</script>

<style scoped>
.comment_detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--van-gray-1);
}

.comment_detail_list {
  flex: 1;
  overflow-y: auto;
}

.small {
  font-size: 1.2rem;
  color: #999999;
}

.flex_span {
  display: flex;
  align-items: center;
  color: #333333;
  line-height: 2rem;
  padding: 1.4rem 1.5rem;
  background: var(--van-white);
  border-bottom: 1px solid var(--van-gray-4);
}

.comment_reply {
  background: var(--van-white);
  padding: 0 0.7rem;
}

.reply_item_mate {
  background: var(--van-white);
  margin: 1rem 0 0.8rem 0;
  padding: 1.2rem 1.5rem;
}
</style>
